//package com.product.system.aop;
//
//import com.alibaba.fastjson.JSON;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import javax.servlet.http.HttpServletRequest;
//
//@Component
//@Aspect
//public class UserAddLogAop {
//
//    @Autowired
//    HttpServletRequest request;
//
//    @Around("execution( * com.product.system.controller.UserController. * (..))")
//    public Object aop(ProceedingJoinPoint joinPoint) throws Throwable {
//        String name = joinPoint.getSignature().getName();
//        System.out.println("方法名:"+name);
//
//        String remoteAddr = request.getRemoteAddr();
//        System.out.println("ip地址"+remoteAddr);
//
//        Object[] args = joinPoint.getArgs();
//        System.out.println("方法参数:"+ JSON.toJSONString(args));
//        long l = System.currentTimeMillis();
//        Object proceed = joinPoint.proceed();
//        long l2= System.currentTimeMillis();
//        System.out.println("执行时间是:"+(l2-l));
//        return proceed;
//
//    }
//
//
//
//}
